home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 3.0 KB | 74 lines | [TEXT/GEOL] |
- Item 1657317 10-Sept-90 08:43PDT
-
- From: PASCOE1 Pascoe, Geoff
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: Shell Shocked in Lang. Wars
-
- Phil,
-
- "Let us pretend that we really are writing reusable modules."
-
- "Pretend" is the operative word here. And, yes all I care about is the
- interface. Unfortunately, C++ DOES care about more than the interface.
-
- Question: Is private data and member functions part of an object's interface?
-
- "Let's try that one again, too. If you _really_ have resuable code, then you
- could write a module in OP, link it into a C++ component, and invoke it from
- a Lisp program. Why do I need to know (or care) what language it was
- originally written in? Please note that this is not the way the world works,
- only the way it is supposed to work."
-
- Yes, the world doesn't work that way. Precisely my point!
-
- "The whole point of "xxx.h" files is so that this does not happen.
- As long as the "xxx.h" file remains unchanged (which is really the
- public part of the interface) that can't happen."
-
- Sadly, I don't share your faith in .h files. Also, refer to the question
- above.
-
- "Who can it be underwhelming and taking over the world?"
-
- I can't answer a question I don't understand.
-
- "Mene, mene, tekel uparshim."
-
- Could you put that in English, please?
-
- ---------------------------------
-
- Peter,
-
- Interestingly, there is/was an object-oriented language that had a feature that
- permitted programmers to insert classes in the class hierarchy. Objective-C.
- The feature was called "pose-as", after the message (poseAs:) which could be
- sent to a class (classes are objects in Objective-C). Some programmers found
- it very useful. Unfortunately, it had some problems, particularly with
- multiple insertions. I don't recall whether the problems were ones of
- implementation, design, or concept. Nevertheless, I'm skeptical because of my
- previous experience.
-
- Paramaterized types are real neat- at least for statically typed languages.
- They're very useful for data structure types of objects: lists, sets, bags,
- etc. What are they? Well, when you write a class that contains other objects
- you tell the class that the objects are a parameter, say TFoo. You use TFoo
- throughout the class definition. When you use the class for real objects
- (TRealObject) you declare the class with the type of the real object you will
- use it for. Basically, say good-bye to type-coercions when using TList type
- containers. Check out Meyer's book!
-
- I agree with most of the rest of your statements. I, personally, would not
- scream foul if I couldn't access instance variables directly. As far as
- calling grandparent methods- big mistake. This is like the goto of OOP.
- Although it might appear useful you'll be better off if you structure your
- classes so you don't have to do this. I'm against a language feature that
- enables this. NO INHERITED (-1) , ppppplease (Roger Rabbit style). Or, worse
- yet, the MANDATORY use of scope resolution operators to call inherited methods-
- another C++ "feature".
-
- Geoff
-
-